import request from '@/config/axios'


export const StoreTypeApi = {
  // 创建商铺类型
  createStoreType: async (data: any) => {
    return await request.post({ url: `/shops/type/create`, data })
  },
  // 更新商铺类型
  updateStoreType: async (data: any) => {
    return await request.put({ url: `/shops/type/update`, data })
  },
  // 获取商铺售卖类型分页
  getStoreSaleTypePage: async (params: any) => {
    return await request.get({ url: `/shops/goods-category/page`, params })
  },
  // 获取商铺类型分页
  getStoreTypePage: async (params: any) => {
    return await request.get({ url: `/shops/type/page`, params })
  },
  // 获取商铺类型
  getStoreType: async (params: any) => {
    return await request.get({ url: `/shops/type/get`, params })
  },
  // 删除商铺类型
  deleteStoreType: async (id: number) => {
    return await request.delete({ url: `/shops/type/delete?id=` + id })
  }
}